package com.ojoin.ojoin.eb_spider.drools;

import java.io.IOException;

/*import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.FactHandle;*/

public class PointRuleEngineImpl  {

	public static void main(String[] args) throws IOException {
		
		/*final KnowledgeBuilder kbuilder = KnowledgeBuilderFactory
				.newKnowledgeBuilder();
		kbuilder.add(ResourceFactory.newClassPathResource("addpoint.drl",
				PointDomain.class), ResourceType.DRL);

		final KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
		kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());

		final StatefulKnowledgeSession ksession = kbase
				.newStatefulKnowledgeSession();

		PointDomain pointDomain = new PointDomain();
		pointDomain.setUserName("hello kity");
		pointDomain.setBackMondy(100d);
		pointDomain.setBuyMoney(500d);
		pointDomain.setBackNums(1);
		pointDomain.setBuyNums(5);
		pointDomain.setBillThisMonth(5);
		pointDomain.setBirthDay(true);
		pointDomain.setPoint(0l);


		FactHandle hatPurchaseHandle = ksession.insert(pointDomain);

		ksession.fireAllRules();

		ksession.retract(hatPurchaseHandle);
		
		System.out.println("pointDomain-->"+pointDomain.getPoint());
		 
		ksession.fireAllRules();*/
		

	}
}
